Skip to content

feat(draggable-core): Create package#1622

Closed
gabriellsh wants to merge 2 commits intomainfrom
feat/draggableElements
Closed

feat(draggable-core): Create package#1622
gabriellsh wants to merge 2 commits intomainfrom
feat/draggableElements

Conversation

@gabriellsh
Copy link
Member

Proposed changes (including videos or screenshots)

Issue(s)

Further comments

@changeset-bot
Copy link

changeset-bot bot commented Apr 15, 2025

⚠️ No Changeset found

Latest commit: 5cd4b3c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

if (!app) return;

// Create a draggable box
const box = document.createElement('div');

Check notice

Code scanning / CodeQL

Unused variable, import, function or class Note

Unused variable box.

Copilot Autofix

AI 11 months ago

To fix the problem, we need to remove the unused variable box from the code. This involves deleting the line where box is declared and initialized, as well as any related commented-out code that references box. This will improve code readability and eliminate unnecessary memory usage.

Suggested changeset 1
packages/draggable-core/src/index.ts

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/packages/draggable-core/src/index.ts b/packages/draggable-core/src/index.ts
--- a/packages/draggable-core/src/index.ts
+++ b/packages/draggable-core/src/index.ts
@@ -204,9 +204,9 @@
   // Create a draggable box
-  const box = document.createElement('div');
-//   box.style.width = '100px';
-//   box.style.height = '100px';
-//   box.style.backgroundColor = '#3498db';
-//   box.style.borderRadius = '4px';
-//   box.style.left = '0px';
-//   box.style.top = '0px';
+
+
+
+
+
+
+
 
@@ -220,3 +220,3 @@
 
-//   box.appendChild(innerBox);
+
   app.appendChild(innerBox);
@@ -226,6 +226,6 @@
   // Add some instructions
-//   const instructions = document.createElement('p');
-//   instructions.textContent = 'Drag the blue box around!';
-//   instructions.style.marginTop = '20px';
-//   app.appendChild(instructions);
+
+
+
+
 });
EOF
@@ -204,9 +204,9 @@
// Create a draggable box
const box = document.createElement('div');
// box.style.width = '100px';
// box.style.height = '100px';
// box.style.backgroundColor = '#3498db';
// box.style.borderRadius = '4px';
// box.style.left = '0px';
// box.style.top = '0px';








@@ -220,3 +220,3 @@

// box.appendChild(innerBox);

app.appendChild(innerBox);
@@ -226,6 +226,6 @@
// Add some instructions
// const instructions = document.createElement('p');
// instructions.textContent = 'Drag the blue box around!';
// instructions.style.marginTop = '20px';
// app.appendChild(instructions);




});
Copilot is powered by AI and may make mistakes. Always verify output.
@dougfabris
Copy link
Member

why @rocket.chat/draggable-core it seems weird to me since we don't use this name pattern here. Why not @rocket.chat/fuselage-draggable or @rocket.chat/draggable?

@gabriellsh gabriellsh closed this Aug 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants